import axios from '@/libs/request/axios'
import {getUri} from "@/libs/tools";
//影像件初始化
export const getAllFileList = (param) => {
    return axios.request({
        url: `/${getUri('image')}/audit/getAllFileList`,
        data:param ,
        method: 'post'
    })
}
//影像件状态修改
export const updateFileStatus = (param) => {
    return axios.request({
        url: `/${getUri('image')}/audit/updateFileStatus`,
        data:param ,
        method: 'post'
    })
}
//影像件状态修改
export const getHistoryVersion = (busiNo,busiNode) => {
    return axios.request({
        url: `/${getUri('image')}/audit/getHistoryVersion`,
        params:{
            busiNo:busiNo,
            busiNode:busiNode
        } ,
        method: 'post'
    })
}

//影像件初始化
export const getLoanAllFileList = (param) => {
    return axios.request({
        url: `/${getUri('image')}/audit/getLoanAllFileList`,
        data:param ,
        method: 'post'
    })
}

//根据唯一标识获取文件**返回List<ComAttachmentFile>
export const getFileByUniqueCode = (groups,busiNo,belongNo,path) => {
    return axios.request({
        url: `/${path==''?getUri('image'):path}/audit/getFileByUniqueCode`,
        params: {
            uniqueCodes:groups,// 多个标识使用"," 连接
            busiNo:busiNo,
            belongNo:belongNo
        } ,
        method: 'post'
    })
}

//审核文件为合格状态
export const setFileStandard = (contractNo,attachmentCode,path) => {
    return axios.request({
        url: `/${path==''?getUri('image'):path}/audit/setFileStandard`,
        params: {
            contractNo:contractNo,
            attachmentCode:attachmentCode
        } ,
        method: 'post'
    })
}

//获取经销商预留印鉴
export const getDealerSignFiles = (contractNo) => {
    return axios.request({
        url: `/case/imageManage/getDealerSignFiles`,
        params: {
            contractNo:contractNo
        } ,
        method: 'post'
    })
}



